<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
				xmlns:xhtml="http://www.w3.org/1999/xhtml"
				xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
				version="1.0">

<xsl:output method="xml"
            indent="yes"
            omit-xml-declaration="yes"
            encoding="utf-8"/>

<!--<xsl:template match='node() | @*'>-->
<!--  <xsl:copy>-->
<!--    <xsl:apply-templates select='node() | @*' />-->
<!--  </xsl:copy>-->
<!--</xsl:template>-->

<xsl:template match='/'>
	<xsl:apply-templates select='//xhtml:div[@id="sol"]' />
</xsl:template>

<xsl:template match='xhtml:div[@id="sol"]'>
	<xsl:apply-templates select='*' />
</xsl:template>

<xsl:template match='xhtml:div[contains(@class,"processing-instruction")]'>
	<xsl:processing-instruction name='{./xhtml:div[@class="label"]/xhtml:input/@value}'>
		<xsl:value-of select='./xhtml:div[@class="value"]/xhtml:input/@value' />	
	</xsl:processing-instruction>
</xsl:template>

<xsl:template match='xhtml:div[contains(@class,"element")]'>
	<xsl:element name='{./xhtml:div[@class="label"]/xhtml:input/@value}'>
		<xsl:apply-templates select='xhtml:div[contains(@class,"container")]' />
	</xsl:element>
</xsl:template>

<xsl:template match='xhtml:div[contains(@class,"attribute")]'>
	<xsl:attribute name='{./xhtml:div[@class="label"]/xhtml:input/@value}'>
		<xsl:value-of select='./xhtml:div[@class="value"]/xhtml:input/@value' />
	</xsl:attribute>
</xsl:template>

<xsl:template match='xhtml:div[contains(@class,"text")]'>
	<xsl:value-of select='./xhtml:div[@class="value"]/xhtml:input/@value' />
</xsl:template>

<xsl:template match='xhtml:div[contains(@class,"comment")]'>
	<xsl:comment>
		<xsl:value-of select='./xhtml:div[@class="value"]/xhtml:input/@value' />
	</xsl:comment>
</xsl:template>

<!--<xsl:template match='xhtml:div[@class="buttons"]' />-->
<!--<xsl:template match='xhtml:div[@class="controls"]' />-->

</xsl:stylesheet>
